<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<html>
<head>
	
</head>
<body style="">

	<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>

<style type="text/css">
	body{position: relative;position: }
</style>
<div style="position: fixed;right:100px;top:100px;">
	<button style="height:30px;"><a href="javascript:if(confirm('确实要导出订单?'))location='?m=member&c=member&a=outPutOrder&pc_hash=<?php echo $_SESSION['pc_hash']?>'">导出订单</a></button>
</div>


<div class="container" style="margin-top: 20px;">
    <style type="text/css">
				.table-d { background:#000;color:#000;font-size: 20px;text-align: center;width: 100%;margin-bottom: 20px;} 
				.table-d  td{ background:#FFF;/* sfont-weight: bolder; */padding: 5px 5px;overflow: hidden;} 
				.table-d td span{color: #c00}
				.table-d textarea{font-size: 12px;}
				.table-d td img{width: 200px;}
				.order_title div{float: left;color:#000;font-size: 18px;margin-bottom:10px;padding: 5px;}
				.order_title .btn{width:100px;text-align: center;}
				.order_title .tips{margin-left: 20px;}
	</style>
	<script type="text/javascript">
		$(function(){
			
			$(".addAskQuestion").click(function(){
				
				var obj=$(this).parents().parents().parents().parents().parents();
				obj.find('input[name=submitType]').val('askType');
				obj.submit();
				
			})
			$(".addOrderQuestion").click(function(){
				
				var obj=$(this).parents().parents().parents().parents().parents();
				obj.find('input[name=submitType]').val('orderType');
				obj.submit();
			
			})


		})

		function addAskQuestion(order_id,goods_id)
		{

			$('#other').click(function() {
			  $('#target').submit();
			});
			/*$.post('url',{'order_id':order_id,'goods_id':goods_id,},function(data){

			})*/
		}
		function addOrderQuestion()
		{

		}
	</script>
	<table width="1070px;" style="margin:0 auto;">
		<?php foreach ($res as $key => $val) {?>
			
		<tr>
			<td>
				<form class="form" action="?m=member&c=member&a=submitAskQuestion&pc_hash=<?php echo $_SESSION['pc_hash']?>" method="post">
				<table class='table-d'  border="0" cellspacing="1" cellpadding="0" style="margin:0px;">
				<tr style="font-size:20px;">
					<td width="100px">ID</td>
					<td style="width:150px;">用户</td>
					<td width="100px" height="50px">품번.商品名称</td>
					<td style="width:200px;padding:0px;">사진.图片</td>
					<td>단가.单价</td>
					<td>글쓰기.留言</td>
					<td>보내기.提交</td>
				
				</tr>
				
				<tr style="height:64px;overflow: hidden;font-size:16px;">
					<td width='50px'><?php echo $val[id]?></td>
					<td><?php echo $val[username]?></td>
					<td><div sytle=""><a target="_blank" href='<?php echo $val['url']?>'><?php echo $val[title]?></a></div></td>
					<td style="padding:0px;"><a target="_blank" href='<?php echo $val['url']?>'><img style="margin:0px;width:200px;" src="<?php echo $val[thumb]?>"/></a></td>
					<td width='150px'><?php echo $val[price]?></td>
					<td  style="width:300px;padding:0px;">
						<textarea style="font-size:20px;width:336px;height:195px;margin:0px;border:none;" rows="10" cols="20" name="info" id="content{$key}" boxid="content"></textarea>
						
						<script type="text/javascript">
							/*CKEDITOR.replace( 'content{$key}',{height:50,textareaid:'content{$key}',module:'content',catid:'26',flashupload:true,alowuploadexts:'',allowbrowser:'1',allowuploadnum:'10',filebrowserUploadUrl : 'index.php?m=attachment&c=attachments&a=upload&module=content&catid=26&dosubmit=1',toolbar :[
			    					['Image','Maximize'],
								]});
*/
						</script>
					</td>
					<td width="120px" style="font-size:18px;">
						<a class="del-order" href="javascript:if(confirm('确实要删除该内容吗?'))location='?m=member&c=member&a=delOrder&orderid=<?php echo $val['id']?>&pc_hash=<?php echo $_SESSION['pc_hash']?>'" style="background:#FFFF00;margin-bottom:10px;cursor:pointer">删除</a>
						<input name="order_id" class='order-id' type='hidden' value='<?php echo $val[id]?>'/>
						<input name="goods_id" class='goods-id' type='hidden' value='<?php echo $val[goodsid]?>'/>
						<input name="submitType" type='hidden' value=''/>
						</td></td>
				
				</tr>
				
				<tr style="border:none;">
					<td border='0' colspan="7" style="padding:0px;border:none;">
						<table  class='table-d ask-table' style="margin:0"  border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="73px" style="border-right:1px solid #000;border-bottom:1px solid #000;">类型</td>
								<td style="width:409px;border-right:1px solid #000;border-bottom:1px solid #000;">내용.内容</td>
					
								<td style="width:447px;border-right:1px solid #000;border-bottom:1px solid #000;">답글.答复</td>
								<td style="border-bottom:1px solid #000;">操作</td>
							</tr>
							<tr>
								<td  style="background:#FFFF00;color:#000;border-right:1px solid #000;border-bottom:1px solid #000;"><span>문의<br/>咨询</span></td>
								<td valign="top" style="text-align:left;font-size:16px;border-right:1px solid #000;border-bottom:1px solid #000;"><?php echo $val['user_ask_question']?></td>
								<td valign="top" style="text-align:left;font-size:16px;border-right:1px solid #000;border-bottom:1px solid #000;"><?php echo $val['admin_ask_question']?></td>
								<td  style="background:#FFFF00;color:#000;border-bottom:1px solid #000;"><span class="addAskQuestion">新增提交</span></td>
							</tr>
							<tr>
								<td style="background:#00B0F0;color:#000;border-right:1px solid #000;"><span style="background:#00B0F0;color:#000;">주문<br/>订单</span></td>
								<td valign="top" style="text-align:left;font-size:16px;border-right:1px solid #000;"><?php echo $val['user_order_question']?></td>
								<td valign="top" style="text-align:left;font-size:16px;border-right:1px solid #000;"><?php echo $val['admin_order_question']?></td>
								<td style="background:#00B0F0;color:#000;"><span class="addOrderQuestion">新增提交</span></td>
							</tr>
						</table>
					</td>
					
				</tr>
			</table>
		</div>
			</form>
			</td>
		</tr>
		
		<?php }?>
	</table>

</div>

</body>
</html>